package top.xierongsheng.user.validate;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import top.xierongsheng.user.validate.impl.LevelValidator;

import java.lang.annotation.*;

@Documented
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = LevelValidator.class)
public @interface ValidLevel {
    String message() default "";

    String source() default "";

    int values() default 0;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
